package Visualisation;

import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.StringTokenizer;

public class test {

	public static void main(String[] args) {

		DataInputStream dis = null;
		int[] carArray = new int[20];

		try {

			File f = new File("out.dat");
			FileInputStream fis = new FileInputStream(f);
			BufferedInputStream bis = new BufferedInputStream(fis);
			dis = new DataInputStream(bis);
			//we will read in and load the frequency table with values from the text file

			String str;

			while ((str = dis.readLine()) != null) {
				StringTokenizer st = new StringTokenizer(str, "\t");                   

				while(st.hasMoreTokens()){
					String s = st.nextToken();
					System.out.print(s + ", ");
				}





			} 
		} catch (IOException e) {
			System.out.println("Uh oh, got an IOException error: " + e.getMessage());
		} finally {
			// if the file opened okay, make sure we close it
			if (dis != null) {
				try {
					dis.close();
				} catch (IOException ioe) {
					System.out.println("IOException error trying to close the file: " );
				}
			} // end if
		} // end finally



	}

}
